package com.lg.patter.behavior.observed.ex.myex;

/**
 * @author by Mr. Li 2020/5/8 22:31
 */
public class CurrentConditionsDisplay implements Observer {
    private Subject weatherData;

    public CurrentConditionsDisplay(Subject weatherData) {
        this.weatherData = weatherData;
        weatherData.registerObserver(this);// 把当前的对象注册成观察者
    }

    @Override
    public void update(Object obj) {

        System.out.println(obj);
    }
}
